def s = "Received message from ${message.from} with body ${message.body}, ${message.stanza}"
log.info s
def recipient = message.from
// check if the service is online
if (xmpp.getPresence(recipient).isAvailable()) {
	// send the message
	def status = xmpp.send(to: recipient, body: "Hello, how are you?")
	 
	// checks the message was successfully delivered to all the recipients
	assert status.isSuccessful()
}

